/*
 * uc_dipsw.c
 *
 *  Created on: Feb 7, 2013
 *      Author: btgarber
 */

#include "common.h"


int uc_dipsw_get_state(int p_switch)
{
	return gpio_port_dd_get_pin_state(p_switch+3);
	
	// Calls gpio_port_dd_get_pin_state() to return the state of the pin connected to p_switch.
	
}

void uc_dipsw_init()
{
	//
	int i;
	for (i = 0; i<4; i++)
	{
		gpio_port_dd_init(i);
	}
		// Calls gpio_port_dd_init() to initialize switches 1, 2, 3, and 4.
}